home *** CD-ROM | disk | FTP | other *** search
/ Programming a Multiplayer FPS in DirectX / Programming a Multiplayer FPS in DirectX (Companion CD).iso / DirectX / dxsdk_oct2004.exe / dxsdk.exe / Utilities / Content Creation Tool Plug-Ins / Maya / Sources / device.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-09-27  |  1.2 KB  |  38 lines

  1. //--------------------------------------------------------------------------------------
  2. // File: Device.h
  3. //
  4. // Encapsulates a Direct3D device which exists in a separate thread
  5. //
  6. // Copyright (c) Microsoft Corporation. All rights reserved
  7. //--------------------------------------------------------------------------------------
  8. #pragma once
  9. #ifndef ENGINE_H
  10. #define ENGINE_H
  11.  
  12. class CEngine : public CPipelineEngine, public CPipelineManagerEvents
  13. {
  14. public:
  15.     virtual HRESULT Create( CPipeline* pPreviewPipeline );
  16.     virtual HRESULT Destroy();
  17.  
  18.     virtual HRESULT GetD3DObject( IDirect3D9** ppObject );
  19.     virtual HRESULT GetD3DDevice( IDirect3DDevice9** ppDevice );
  20.  
  21. private:
  22.     UINT __stdcall RunThread();
  23.     static UINT __stdcall StaticRunThread( void* pParam );
  24.  
  25.     static bool CALLBACK IsDeviceAcceptable( D3DCAPS9* pCaps, D3DFORMAT AdapterFormat, D3DFORMAT BackBufferFormat, bool bWindowed );
  26.     static void CALLBACK ModifyDeviceSettings( DXUTDeviceSettings* pDeviceSettings, const D3DCAPS9* pCaps );
  27.  
  28. private:
  29.     bool m_bDestroyCalled;
  30.     UINT m_nThreadID;
  31.     uintptr_t m_hThread;
  32.     HWND m_hwndFocus;
  33.  
  34.     IDirect3DDevice9* m_pd3dDevice;
  35.     CPipeline* m_pPreviewPipeline;
  36. };
  37.  
  38. #endif //ENGINE_H